{any_include file="scp_page_start.tpl" wide=1}

<!-- $Id$ -->

<h1>OAuth - Connect To Server</h1>

{any_include file="scp_oauth_menu.tpl"}

{if $error == 'NOSERVER'}
<p class="notice">Could not find the server definition. <a href="{$rel_path}module/OAuth/consumer/list">Back to the list of servers</a>
{else}

<p>
	You are about to connect to <strong><a href="{$server.server_uri|escape}" title="Go to {$server.server_uri|escape}">{$server.server_uri|escape}</a></strong>
</p>

	</dd>
</dl>

<p>
</p>

<p>
	When you click on the <em>Redirect And Log On</em> button below, the following steps will be done:
</p>

<ol>
	<li>you will be redirected to the server at {$server.server_uri|escape}</li>
	<li>you will be asked to log on to that server</li>
	<li>you will be redirected back to this site</li>
	<li>the connection between this site and the server is made</li>
</ol>

<form action="{$rel_path}module/OAuth/consumer/connect" method="POST">
<p>
	<input type="hidden" name="consumer_key" value="{$server.consumer_key|escape}" />
	
	<button class="submit" type="submit">
		Redirect And Log On
	</button>
	
	<a class="button" href="{$rel_path}module/OAuth/consumer/register?consumer_key={$server.consumer_key|escape:"url"}">
		Update Server Details
	</a>

	<a class="button" href="{$rel_path}module/OAuth/consumer/delete?consumer_key={$server.consumer_key|escape:"url"}">
		Delete Server
	</a>

	<a class="button" href="{$rel_path}module/OAuth/consumer/list">
		Cancel
	</a>
</p>
</form>

{/if}

{any_include file="scp_page_end.tpl" wide=1}
